package demo2;

import org.w3c.dom.ls.LSOutput;

public class Duck extends Animal implements IRunable,ISwimable,IFlyable{
    public Duck(String name,int age) {
        super(name,age);
    }

    @Override
    public void eat() {
        System.out.println(this.name+"正在吃鸭食");
    }
    public void run() {
        System.out.println(this.name+"正在跑");
    }
    public void swim() {
        System.out.println(this.name+"正在游");
    }
    public void fly() {
        System.out.println(this.name+"正在飞翔");
    }
}
